package com.wang.hw.hw3;

public class TestShape {
    public static void main(String[] args) {
        Rectangle rec = new Rectangle(4,4);
        System.out.println("矩形的周长：" + rec.getPerimeter());
        System.out.println("矩形的面积：" + rec.getArea());
        System.out.println("-----------------------------");
        Parallelogram par = new Parallelogram(4,4,4);
        System.out.println("平行四边形的周长：" + par.getPerimeter());
        System.out.println("平行四边形的面积：" + par.getArea());
        System.out.println("-----------------------------");
        Triangle tr = new Triangle(4,4,4,4);
        System.out.println("三角形的周长：" + tr.getPerimeter());
        System.out.println("三角形的面积：" + tr.getArea());
        System.out.println("-----------------------------");
        Trapezoid tra = new Trapezoid(4,4,4,4);
        System.out.println("梯形的周长：" + tra.getPerimeter());
        System.out.println("梯形的面积：" + tra.getArea());
    }
}
